/*     */ package com.umeng.analytics.a;
/*     */ 
/*     */ import android.content.Context;
/*     */ import android.content.SharedPreferences;
/*     */ import android.os.Build;
/*     */ import android.os.Build.VERSION;
/*     */ import android.util.Log;
/*     */ import com.umeng.analytics.j;
/*     */ import com.umeng.common.b;
/*     */ import org.json.JSONObject;
/*     */ 
/*     */ public class f
/*     */   implements g
/*     */ {
/*     */   public String a;
/*     */   public String b;
/*     */   public String c;
/*     */   public String d;
/*     */   public String e;
/*     */   public long f;
/*     */   public String g;
/*     */   public String h;
/*     */   public String i;
/*     */   public String j;
/*     */   public String k;
/*     */   public String l;
/*     */   public String m;
/*     */   public String n;
/*     */   public String o;
/*     */   public long p;
/*     */   public String q;
/*     */   public String r;
/*     */   public String s;
/*     */   public String t;
/*     */   public String u;
/*     */   public String v;
/*     */   public String w;
/*     */   public String x;
/*     */   public int y;
/*     */   public String z;
/*     */   public String A;
/*     */   public String B;
/*     */   public String C;
/*     */   public String D;
/*     */   public String E;
/*     */   public String F;
/*  58 */   private final String G = "appkey";
/*  59 */   private final String H = "channel";
/*  60 */   private final String I = "device_id";
/*  61 */   private final String J = "idmd5";
/*  62 */   private final String K = "mc";
/*  63 */   private final String L = "req_time";
/*     */ 
/*  65 */   private final String M = "device_model";
/*  66 */   private final String N = "os";
/*  67 */   private final String O = "os_version";
/*  68 */   private final String P = "resolution";
/*  69 */   private final String Q = "cpu";
/*  70 */   private final String R = "gpu_vender";
/*  71 */   private final String S = "gpu_renderer";
/*  72 */   private final String T = "device_board";
/*  73 */   private final String U = "device_brand";
/*  74 */   private final String V = "device_manutime";
/*  75 */   private final String W = "device_manufacturer";
/*  76 */   private final String X = "device_manuid";
/*  77 */   private final String Y = "device_name";
/*     */ 
/*  79 */   private final String Z = "app_version";
/*  80 */   private final String aa = "version_code";
/*  81 */   private final String ab = "package_name";
/*     */ 
/*  83 */   private final String ac = "sdk_type";
/*  84 */   private final String ad = "sdk_version";
/*     */ 
/*  86 */   private final String ae = "timezone";
/*  87 */   private final String af = "country";
/*  88 */   private final String ag = "language";
/*     */ 
/*  90 */   private final String ah = "access";
/*  91 */   private final String ai = "access_subtype";
/*  92 */   private final String aj = "carrier";
/*     */ 
/*  97 */   private final String ak = "wrapper_type";
/*  98 */   private final String al = "wrapper_version";
/*     */ 
/*     */   public f()
/*     */   {
/*     */   }
/*     */ 
/*     */   public f(String paramString1, String paramString2) {
/* 105 */     this.a = paramString1;
/* 106 */     this.b = paramString2;
/*     */   }
/*     */ 
/*     */   private void c(JSONObject paramJSONObject) throws Exception
/*     */   {
/* 111 */     this.a = paramJSONObject.getString("appkey");
/* 112 */     this.c = paramJSONObject.getString("device_id");
/* 113 */     this.d = paramJSONObject.getString("idmd5");
/*     */ 
/* 115 */     if (paramJSONObject.has("mc")) {
/* 116 */       this.e = paramJSONObject.getString("mc");
/*     */     }
/*     */ 
/* 119 */     if (paramJSONObject.has("channel")) {
/* 120 */       this.b = paramJSONObject.getString("channel");
/*     */     }
/*     */ 
/* 123 */     if (paramJSONObject.has("req_time"))
/* 124 */       this.f = paramJSONObject.getLong("req_time");
/*     */   }
/*     */ 
/*     */   private void d(JSONObject paramJSONObject)
/*     */     throws Exception
/*     */   {
/* 130 */     this.g = (paramJSONObject.has("device_model") ? paramJSONObject.getString("device_model") : null);
/* 131 */     this.h = (paramJSONObject.has("os") ? paramJSONObject.getString("os") : null);
/* 132 */     this.i = (paramJSONObject.has("os_version") ? paramJSONObject.getString("os_version") : null);
/* 133 */     this.j = (paramJSONObject.has("resolution") ? paramJSONObject.getString("resolution") : null);
/* 134 */     this.k = (paramJSONObject.has("cpu") ? paramJSONObject.getString("cpu") : null);
/* 135 */     this.l = (paramJSONObject.has("gpu_vender") ? paramJSONObject.getString("gpu_vender") : null);
/* 136 */     this.m = (paramJSONObject.has("gpu_renderer") ? paramJSONObject.getString("gpu_renderer") : null);
/*     */ 
/* 138 */     this.n = (paramJSONObject.has("device_board") ? paramJSONObject.getString("device_board") : null);
/* 139 */     this.o = (paramJSONObject.has("device_brand") ? paramJSONObject.getString("device_brand") : null);
/* 140 */     this.p = (paramJSONObject.has("device_manutime") ? paramJSONObject.getLong("device_manutime") : 0L);
/* 141 */     this.q = (paramJSONObject.has("device_manufacturer") ? paramJSONObject.getString("device_manufacturer") : null);
/* 142 */     this.r = (paramJSONObject.has("device_manuid") ? paramJSONObject.getString("device_manuid") : null);
/* 143 */     this.s = (paramJSONObject.has("device_name") ? paramJSONObject.getString("device_name") : null);
/*     */   }
/*     */ 
/*     */   private void e(JSONObject paramJSONObject) throws Exception
/*     */   {
/* 148 */     this.t = (paramJSONObject.has("app_version") ? paramJSONObject.getString("app_version") : null);
/* 149 */     this.u = (paramJSONObject.has("version_code") ? paramJSONObject.getString("version_code") : null);
/* 150 */     this.v = (paramJSONObject.has("package_name") ? paramJSONObject.getString("package_name") : null);
/*     */   }
/*     */ 
/*     */   private void f(JSONObject paramJSONObject) throws Exception {
/* 154 */     this.w = paramJSONObject.getString("sdk_type");
/* 155 */     this.x = paramJSONObject.getString("sdk_version");
/*     */   }
/*     */ 
/*     */   private void g(JSONObject paramJSONObject) throws Exception {
/* 159 */     this.y = (paramJSONObject.has("timezone") ? paramJSONObject.getInt("timezone") : 8);
/* 160 */     this.z = (paramJSONObject.has("country") ? paramJSONObject.getString("country") : null);
/* 161 */     this.A = (paramJSONObject.has("language") ? paramJSONObject.getString("language") : null);
/*     */   }
/*     */ 
/*     */   private void h(JSONObject paramJSONObject) throws Exception {
/* 165 */     this.B = (paramJSONObject.has("access") ? paramJSONObject.getString("access") : null);
/* 166 */     this.C = (paramJSONObject.has("access_subtype") ? paramJSONObject.getString("access_subtype") : null);
/* 167 */     this.D = (paramJSONObject.has("carrier") ? paramJSONObject.getString("carrier") : null);
/*     */   }
/*     */ 
/*     */   private void i(JSONObject paramJSONObject) throws Exception {
/* 171 */     this.E = (paramJSONObject.has("wrapper_type") ? paramJSONObject.getString("wrapper_type") : null);
/* 172 */     this.F = (paramJSONObject.has("wrapper_version") ? paramJSONObject.getString("wrapper_version") : null);
/*     */   }
/*     */ 
/*     */   public void a(JSONObject paramJSONObject) throws Exception
/*     */   {
/* 177 */     if (paramJSONObject == null) return;
/*     */ 
/* 179 */     c(paramJSONObject);
/* 180 */     d(paramJSONObject);
/* 181 */     e(paramJSONObject);
/* 182 */     f(paramJSONObject);
/* 183 */     g(paramJSONObject);
/* 184 */     h(paramJSONObject);
/*     */ 
/* 186 */     i(paramJSONObject);
/*     */   }
/*     */ 
/*     */   private void j(JSONObject paramJSONObject) throws Exception {
/* 190 */     paramJSONObject.put("appkey", this.a);
/* 191 */     paramJSONObject.put("device_id", this.c);
/* 192 */     paramJSONObject.put("idmd5", this.d);
/*     */ 
/* 194 */     if (this.b != null) paramJSONObject.put("channel", this.b);
/* 195 */     if (this.e != null) paramJSONObject.put("mc", this.e);
/* 196 */     if (this.f > 0L) paramJSONObject.put("req_time", this.f); 
/*     */   }
/*     */ 
/*     */   private void k(JSONObject paramJSONObject)
/*     */     throws Exception
/*     */   {
/* 201 */     if (this.g != null) paramJSONObject.put("device_model", this.g);
/* 202 */     if (this.h != null) paramJSONObject.put("os", this.h);
/* 203 */     if (this.i != null) paramJSONObject.put("os_version", this.i);
/* 204 */     if (this.j != null) paramJSONObject.put("resolution", this.j);
/* 205 */     if (this.k != null) paramJSONObject.put("cpu", this.k);
/* 206 */     if (this.l != null) paramJSONObject.put("gpu_vender", this.l);
/* 207 */     if (this.m != null) paramJSONObject.put("gpu_vender", this.m);
/*     */ 
/* 209 */     if (this.n != null) paramJSONObject.put("device_board", this.n);
/* 210 */     if (this.o != null) paramJSONObject.put("device_brand", this.o);
/* 211 */     if (this.p > 0L) paramJSONObject.put("device_manutime", this.p);
/* 212 */     if (this.q != null) paramJSONObject.put("device_manufacturer", this.q);
/* 213 */     if (this.r != null) paramJSONObject.put("device_manuid", this.r);
/* 214 */     if (this.s != null) paramJSONObject.put("device_name", this.s); 
/*     */   }
/*     */ 
/*     */   private void l(JSONObject paramJSONObject) throws Exception {
/* 218 */     if (this.t != null) paramJSONObject.put("app_version", this.t);
/* 219 */     if (this.u != null) paramJSONObject.put("version_code", this.u);
/* 220 */     if (this.v != null) paramJSONObject.put("package_name", this.v); 
/*     */   }
/*     */ 
/*     */   private void m(JSONObject paramJSONObject)
/*     */     throws Exception
/*     */   {
/* 225 */     paramJSONObject.put("sdk_type", this.w);
/* 226 */     paramJSONObject.put("sdk_version", this.x);
/*     */   }
/*     */ 
/*     */   private void n(JSONObject paramJSONObject) throws Exception {
/* 230 */     paramJSONObject.put("timezone", this.y);
/*     */ 
/* 232 */     if (this.z != null) paramJSONObject.put("country", this.z);
/* 233 */     if (this.A != null) paramJSONObject.put("language", this.A); 
/*     */   }
/*     */ 
/*     */   private void o(JSONObject paramJSONObject) throws Exception {
/* 237 */     if (this.B != null) paramJSONObject.put("access", this.B);
/* 238 */     if (this.C != null) paramJSONObject.put("access_subtype", this.C);
/* 239 */     if (this.D != null) paramJSONObject.put("carrier", this.D); 
/*     */   }
/*     */ 
/*     */   private void p(JSONObject paramJSONObject) throws Exception {
/* 243 */     if (this.E != null) paramJSONObject.put("wrapper_type", this.E);
/* 244 */     if (this.F != null) paramJSONObject.put("wrapper_version", this.F);
/*     */   }
/*     */ 
/*     */   public void b(JSONObject paramJSONObject)
/*     */     throws Exception
/*     */   {
/* 250 */     j(paramJSONObject);
/* 251 */     k(paramJSONObject);
/* 252 */     l(paramJSONObject);
/* 253 */     m(paramJSONObject);
/* 254 */     n(paramJSONObject);
/* 255 */     o(paramJSONObject);
/*     */ 
/* 257 */     p(paramJSONObject);
/*     */   }
/*     */ 
/*     */   public boolean a()
/*     */   {
/* 263 */     if (this.a == null) {
/* 264 */       Log.e("MobclickAgent", "missing appkey ");
/* 265 */       return false;
/*     */     }
/*     */ 
/* 268 */     if ((this.c == null) || (this.d == null)) {
/* 269 */       Log.e("MobclickAgent", "missing device id");
/* 270 */       return false;
/*     */     }
/*     */ 
/* 273 */     return true;
/*     */   }
/*     */ 
/*     */   public void a(Context paramContext, String[] paramArrayOfString) {
/* 277 */     if ((paramArrayOfString != null) && (paramArrayOfString.length == 2)) {
/* 278 */       this.a = paramArrayOfString[0];
/* 279 */       this.b = paramArrayOfString[1];
/*     */     }
/*     */ 
/* 282 */     if (this.a == null) this.a = b.q(paramContext);
/* 283 */     if (this.b == null) this.b = b.u(paramContext);
/*     */ 
/* 285 */     this.c = b.g(paramContext);
/* 286 */     this.d = b.h(paramContext);
/* 287 */     this.e = b.r(paramContext);
/*     */ 
/* 289 */     SharedPreferences localSharedPreferences = j.c(paramContext);
/*     */ 
/* 291 */     if (localSharedPreferences != null)
/* 292 */       this.f = localSharedPreferences.getLong("req_time", 0L);
/*     */   }
/*     */ 
/*     */   public void a(Context paramContext)
/*     */   {
/* 297 */     this.g = Build.MODEL;
/* 298 */     this.h = "Android";
/* 299 */     this.i = Build.VERSION.RELEASE;
/* 300 */     this.j = b.s(paramContext);
/* 301 */     this.k = b.a();
/*     */ 
/* 304 */     this.n = Build.BOARD;
/* 305 */     this.o = Build.BRAND;
/* 306 */     this.p = Build.TIME;
/* 307 */     this.q = Build.MANUFACTURER;
/* 308 */     this.r = Build.ID;
/* 309 */     this.s = Build.DEVICE;
/*     */   }
/*     */ 
/*     */   public void b(Context paramContext) {
/* 313 */     this.t = b.e(paramContext);
/* 314 */     this.u = b.d(paramContext);
/* 315 */     this.v = b.v(paramContext);
/*     */   }
/*     */ 
/*     */   public void c(Context paramContext) {
/* 319 */     this.w = "Android";
/* 320 */     this.x = "4.6.3";
/*     */   }
/*     */ 
/*     */   public void d(Context paramContext) {
/* 324 */     this.y = b.o(paramContext);
/*     */ 
/* 326 */     String[] arrayOfString = b.p(paramContext);
/*     */ 
/* 328 */     this.z = arrayOfString[0];
/* 329 */     this.A = arrayOfString[1];
/*     */   }
/*     */ 
/*     */   public void e(Context paramContext) {
/* 333 */     String[] arrayOfString = b.k(paramContext);
/*     */ 
/* 335 */     this.B = arrayOfString[0];
/* 336 */     this.C = arrayOfString[1];
/*     */ 
/* 338 */     this.D = b.t(paramContext);
/*     */   }
/*     */ 
/*     */   public void b(Context paramContext, String[] paramArrayOfString)
/*     */   {
/* 343 */     a(paramContext, paramArrayOfString);
/* 344 */     a(paramContext);
/* 345 */     b(paramContext);
/* 346 */     c(paramContext);
/* 347 */     d(paramContext);
/* 348 */     e(paramContext);
/*     */   }
/*     */ 
/*     */   public boolean b()
/*     */   {
/* 353 */     if ((this.a != null) && (this.c != null)) {
/* 354 */       return true;
/*     */     }
/*     */ 
/* 357 */     return false;
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\umeng_sdk.jar
 * Qualified Name:     com.umeng.analytics.a.f
 * JD-Core Version:    0.6.2
 */